<form action="statics_ip.manage.php" method="get" id="form_p_list" onsubmit="return ajax_list();">
<table width="680" border="0" cellspacing="0" cellpadding="0"  class="from_table">
  <tr>
    <th width="185" style=" padding-left:6px"><a href="javascript:;" onclick="ajax_link();"><tpl> $langSysSIpFlux </tpl></a>  |   <tpl> $langSysSIpFluxDirection </tpl></th>
    <th colspan="3">&nbsp;</th>
    </tr>
  <tr>
    <th width="185"><input type="hidden" name="action" value="trend" />
	  * <tpl> $langSysSPleaseFillInIP </tpl>: </th>
    <td width="530"><input name="ip" id="ip" class="txtinput" type="text" value="<tpl> $ip </tpl>" /></td>
  </tr>
  <tr>
    <th width="185"><tpl> $langSysSPleaseSelectTime </tpl>:</th>
    <td width="530"><input name="time" id="time" type="radio" value="1" 
      <tpl> if $time eq '1' </tpl> checked="checked" <tpl> /if </tpl> /><tpl> $langSysSNonceWeek </tpl>
			<input name="time" id="time" type="radio" value="2" <tpl> if $time eq '2' </tpl> checked="checked" <tpl> /if </tpl> /><tpl> $langSysSUpWeek </tpl>
			<input name="time" id="time" type="radio" value="3" <tpl> if $time eq '3' </tpl> checked="checked" <tpl> /if </tpl> /><tpl> $langSysSNonceMonth </tpl>
			<input name="time" id="time" type="radio" value="4" <tpl> if $time eq '4' </tpl> checked="checked" <tpl> /if </tpl> /><tpl> $langSysSUpMonth </tpl>
	  <input name="time" id="time" type="radio" value="5" <tpl> if $time eq '5' || $time eq ''</tpl> checked="checked" <tpl> /if </tpl> /><tpl> $langSysSLatelyThirtyDay </tpl></td>
  </tr>
  <tr>
    <td width="185" align="right"></td>
    <td colspan="3" align="left"><span class="btn_left">
      <input type="submit" value="<tpl> $langSysSSelect </tpl>" class="btn_submit"/></span></td>
    </tr>
</table>
</form>
<table width="680" border="0" cellspacing="0" cellpadding="0" class="from_table">

  <tr>
    <th><tpl> $langSysSPeriodOfTime </tpl>：</th>
    <td width="530"><tpl> $start_time </tpl> <tpl> $langSysSTo </tpl> <tpl> $end_time </tpl></td>
  </tr>
  
</table>

<div style=" width:680px;">
  	<tpl> $statics_flash </tpl>
</div>
	
  <table class="from_table2_one top-1">
	  <thead>
	  <tr class="area_ajax_list_title"> 
	  	<th class="pd-left" width="200"><tpl> $langSysSTimeSegment </tpl></th>
        <th width="100">PV</th>
	    <th width="380"><tpl> $langSysSPercent </tpl></th>
      </tr>
	  </thead>
       <tpl> foreach from=$ip_array item=one key=key </tpl>
	  <tr>
		<td class="pd-left" width="200" align="left"><tpl> $one.time </tpl></td>
		<td width="100" align="left"><tpl> $one.num </tpl></td>
		<td width="380" align="left"><tpl> if $ip_num neq '' && $ip_num neq '0' </tpl>
			<tpl> $one.num/$ip_num*100|string_format:'%.2f' </tpl>%
		<tpl> else </tpl>
			0.00%
		<tpl> /if </tpl>
		</td>
	  </tr>
        <tpl> /foreach </tpl>
</table>
<script>
function ajax_list(){
	
	/* 取表单参数 */var queryString=$("#form_p_list").formSerialize();
	
	$.ajax({
		url: "statics_ip.manage.php",
		data: queryString,
		type:'post',
		dataType:"html",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			$("#result_content").html(msg);
			hideLoading();
		}
	});
	return false;
}

/* 切换页面 */function ajax_link(str){
	$.ajax({
		url: "statics_ip.manage.php",
		data: 'action=list',
		type:'get',
		dataType:"html",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			$("#result_content").html(msg);
			hideLoading();
		}
	});
	return false;
}
</script>